<?php
/**
 * Copyright (c) 2014 zhenrongbao.com, Inc. All Rights Reserved
 * @author: jiangshuguang
 * @Date  : 14-11-24
 * @Time  : 下午3:20
 * @brief :
 */

function smarty_modifier_activity($activity_type){
    if($activity_type == 'term'){
        $time1 = strtotime('2014-12-12 12:00:00');
        $time2 = strtotime('2014-12-12 13:00:00');
        $time3 = strtotime('2014-12-13 00:00:00');
        $time4 = strtotime('2014-12-14 00:00:00');
        $time5 = strtotime('2014-12-15 00:00:00');
        $time6 = strtotime('2014-12-16 00:00:00');
        $time = time();
        if($time>$time1 && $time<=$time2){
            return 12;
        }else if($time>$time2 && $time<=$time3){
            return 11;
        }else if($time>$time3 && $time<=$time4){
            return 10;
        }else if($time>$time4 && $time<=$time5){
            return 9;
        }else if($time>$time5 && $time<=$time6){
            return 8;
        }else{
            return 8;
        }
    }else{
        return 0;
    }
}
